﻿<%@ Page Title="" Language="C#" MasterPageFile="~/管理员.Master" AutoEventWireup="true" CodeBehind="分销商管理.aspx.cs" Inherits="TicketManagement.分销商管理" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
    .auto-style3 {
        position: relative;
        left: 355px;
        top: 61px;
        width: 890px;
        height: 501px;
    }
        .auto-style4 {
            height: 544px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="auto-style4"> 
        
        <div align="center" vertical-align="center"   >
         </div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="distributorCompanyNumber" DataSourceID="SqlDataSource1" AllowPaging="True" AllowSorting="True" HorizontalAlign="Justify" PageSize="5" CssClass="auto-style3"   >
            <Columns>
                <asp:CommandField ShowSelectButton="True" />
                <asp:BoundField DataField="distributorCompanyNumber" HeaderText="distributorCompanyNumber" ReadOnly="True" SortExpression="distributorCompanyNumber" />
                <asp:BoundField DataField="name" HeaderText="name" SortExpression="name" />
                <asp:BoundField DataField="telephone" HeaderText="telephone" SortExpression="telephone" />
                <asp:BoundField DataField="address" HeaderText="address" SortExpression="address" />
            </Columns>
            <RowStyle HorizontalAlign="Center" />
        </asp:GridView>
           
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ticket_management_systemConnectionString %>" ProviderName="<%$ ConnectionStrings:ticket_management_systemConnectionString.ProviderName %>" SelectCommand="SELECT distributorCompanyNumber, name, telephone, address FROM distributorcompany" ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM [distributorcompany] WHERE [distributorCompanyNumber] = ? AND [name] = ? AND [telephone] = ? AND [address] = ?" InsertCommand="INSERT INTO [distributorcompany] ([distributorCompanyNumber], [name], [telephone], [address]) VALUES (?, ?, ?, ?)" OldValuesParameterFormatString="original_{0}" UpdateCommand="UPDATE [distributorcompany] SET [name] = ?, [telephone] = ?, [address] = ? WHERE [distributorCompanyNumber] = ? AND [name] = ? AND [telephone] = ? AND [address] = ?">
            <DeleteParameters>
                <asp:Parameter Name="original_distributorCompanyNumber" Type="Int32" />
                <asp:Parameter Name="original_name" Type="String" />
                <asp:Parameter Name="original_telephone" Type="Int32" />
                <asp:Parameter Name="original_address" Type="String" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="distributorCompanyNumber" Type="Int32" />
                <asp:Parameter Name="name" Type="String" />
                <asp:Parameter Name="telephone" Type="Int32" />
                <asp:Parameter Name="address" Type="String" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="name" Type="String" />
                <asp:Parameter Name="telephone" Type="Int32" />
                <asp:Parameter Name="address" Type="String" />
                <asp:Parameter Name="original_distributorCompanyNumber" Type="Int32" />
                <asp:Parameter Name="original_name" Type="String" />
                <asp:Parameter Name="original_telephone" Type="Int32" />
                <asp:Parameter Name="original_address" Type="String" />
            </UpdateParameters>
        </asp:SqlDataSource>

        </div>
</asp:Content>
